<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.10"/>
<title>ESP8266_RTOS_SDK: Misc APIs</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">ESP8266_RTOS_SDK
   &#160;<span id="projectnumber">v1.4.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Misc APIs</div>  </div>
</div><!--header-->
<div class="contents">

<p>misc APIs  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structdhcps__lease.html">dhcps_lease</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:ga40bc1cdca057b24c8083b35a5fd67cd9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga40bc1cdca057b24c8083b35a5fd67cd9"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>MAC2STR</b>(a)&#160;&#160;&#160;(a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5]</td></tr>
<tr class="separator:ga40bc1cdca057b24c8083b35a5fd67cd9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad6e69a2870c8f219cc679677af110849"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gad6e69a2870c8f219cc679677af110849"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>MACSTR</b>&#160;&#160;&#160;&quot;%02x:%02x:%02x:%02x:%02x:%02x&quot;</td></tr>
<tr class="separator:gad6e69a2870c8f219cc679677af110849"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf488ccb181cdd5905e55ffb8bff92552"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><b>IP2STR</b>(ipaddr)</td></tr>
<tr class="separator:gaf488ccb181cdd5905e55ffb8bff92552"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac88858dbe588b82edadb33513aed16d4"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gac88858dbe588b82edadb33513aed16d4"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>IPSTR</b>&#160;&#160;&#160;&quot;%d.%d.%d.%d&quot;</td></tr>
<tr class="separator:gac88858dbe588b82edadb33513aed16d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:ga9e40444d24f71f875b15136edec8fc47"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Misc__APIs.html#ga9e40444d24f71f875b15136edec8fc47">dhcp_status</a> { <a class="el" href="group__Misc__APIs.html#gga9e40444d24f71f875b15136edec8fc47a7c9cbdc204a9ed4b2a46cec8daeacfb8">DHCP_STOPPED</a>, 
<a class="el" href="group__Misc__APIs.html#gga9e40444d24f71f875b15136edec8fc47af861d0338581584e3be0abd10af2d0ff">DHCP_STARTED</a>
 }<tr class="separator:ga9e40444d24f71f875b15136edec8fc47"><td class="memSeparator" colspan="2">&#160;</td></tr>
</td></tr>
<tr class="memitem:ga47797d528afd74db93dd37a2c9207333"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Misc__APIs.html#ga47797d528afd74db93dd37a2c9207333">dhcps_offer_option</a> { <a class="el" href="group__Misc__APIs.html#gga47797d528afd74db93dd37a2c9207333a8d64153b2be4f126695bb7f6d36cff2c">OFFER_START</a> = 0x00, 
<a class="el" href="group__Misc__APIs.html#gga47797d528afd74db93dd37a2c9207333ad88e6ec93eb09e1cccb8d4d039681f42">OFFER_ROUTER</a> = 0x01, 
<a class="el" href="group__Misc__APIs.html#gga47797d528afd74db93dd37a2c9207333ab67ba95f9dcf33d1cd600d798c76ab88">OFFER_END</a>
 }<tr class="separator:ga47797d528afd74db93dd37a2c9207333"><td class="memSeparator" colspan="2">&#160;</td></tr>
</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga34cbc249ab7d5737df5cbff540535f9f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Misc__APIs.html#ga34cbc249ab7d5737df5cbff540535f9f">os_delay_us</a> (uint16 us)</td></tr>
<tr class="memdesc:ga34cbc249ab7d5737df5cbff540535f9f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Delay function, maximum value: 65535 us.  <a href="#ga34cbc249ab7d5737df5cbff540535f9f">More...</a><br /></td></tr>
<tr class="separator:ga34cbc249ab7d5737df5cbff540535f9f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1e58a0af820fa16197c614872b2d4eaa"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Misc__APIs.html#ga1e58a0af820fa16197c614872b2d4eaa">os_install_putc1</a> (void(*p)(char c))</td></tr>
<tr class="memdesc:ga1e58a0af820fa16197c614872b2d4eaa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Register the print output function.  <a href="#ga1e58a0af820fa16197c614872b2d4eaa">More...</a><br /></td></tr>
<tr class="separator:ga1e58a0af820fa16197c614872b2d4eaa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga279c08566a8fb3910dff740c106cd26a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Misc__APIs.html#ga279c08566a8fb3910dff740c106cd26a">os_putc</a> (char c)</td></tr>
<tr class="memdesc:ga279c08566a8fb3910dff740c106cd26a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Print a character. Start from from UART0 by default.  <a href="#ga279c08566a8fb3910dff740c106cd26a">More...</a><br /></td></tr>
<tr class="separator:ga279c08566a8fb3910dff740c106cd26a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>misc APIs </p>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="gaf488ccb181cdd5905e55ffb8bff92552"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define IP2STR</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">ipaddr</td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<b>Value:</b><div class="fragment"><div class="line">ip4_addr1_16(ipaddr), \</div>
<div class="line">    ip4_addr2_16(ipaddr), \</div>
<div class="line">    ip4_addr3_16(ipaddr), \</div>
<div class="line">    ip4_addr4_16(ipaddr)</div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a class="anchor" id="ga9e40444d24f71f875b15136edec8fc47"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__Misc__APIs.html#ga9e40444d24f71f875b15136edec8fc47">dhcp_status</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="gga9e40444d24f71f875b15136edec8fc47a7c9cbdc204a9ed4b2a46cec8daeacfb8"></a>DHCP_STOPPED&#160;</td><td class="fielddoc">
<p>disable DHCP </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga9e40444d24f71f875b15136edec8fc47af861d0338581584e3be0abd10af2d0ff"></a>DHCP_STARTED&#160;</td><td class="fielddoc">
<p>enable DHCP </p>
</td></tr>
</table>

</div>
</div>
<a class="anchor" id="ga47797d528afd74db93dd37a2c9207333"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__Misc__APIs.html#ga47797d528afd74db93dd37a2c9207333">dhcps_offer_option</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="gga47797d528afd74db93dd37a2c9207333a8d64153b2be4f126695bb7f6d36cff2c"></a>OFFER_START&#160;</td><td class="fielddoc">
<p>DHCP offer option start </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga47797d528afd74db93dd37a2c9207333ad88e6ec93eb09e1cccb8d4d039681f42"></a>OFFER_ROUTER&#160;</td><td class="fielddoc">
<p>DHCP offer router, only support this option now </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga47797d528afd74db93dd37a2c9207333ab67ba95f9dcf33d1cd600d798c76ab88"></a>OFFER_END&#160;</td><td class="fielddoc">
<p>DHCP offer option start </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga34cbc249ab7d5737df5cbff540535f9f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void os_delay_us </td>
          <td>(</td>
          <td class="paramtype">uint16&#160;</td>
          <td class="paramname"><em>us</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Delay function, maximum value: 65535 us. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">uint16</td><td>us : delay time, uint: us, maximum value: 65535 us</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>null </dd></dl>

</div>
</div>
<a class="anchor" id="ga1e58a0af820fa16197c614872b2d4eaa"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void os_install_putc1 </td>
          <td>(</td>
          <td class="paramtype">void(*)(char c)&#160;</td>
          <td class="paramname"><em>p</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Register the print output function. </p>
<dl class="section attention"><dt>Attention</dt><dd>os_install_putc1((void *)uart1_write_char) in uart_init will set printf to print from UART 1, otherwise, printf will start from UART 0 by default.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">void(*p)(char</td><td>c) - pointer of print function</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>null </dd></dl>

</div>
</div>
<a class="anchor" id="ga279c08566a8fb3910dff740c106cd26a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void os_putc </td>
          <td>(</td>
          <td class="paramtype">char&#160;</td>
          <td class="paramname"><em>c</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Print a character. Start from from UART0 by default. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">char</td><td>c - character to be printed</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>null </dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Tue Mar 1 2016 10:19:26 for ESP8266_RTOS_SDK by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.10
</small></address>
</body>
</html>
